package com.example.common.net;

import com.example.libbase.net.response.IResponse;

/**
 * 诸事皆宜，加油！！！
 *
 * @author hermit
 * @date 2021/6/27 3:50
 */
public class BaseResponse<T> implements IResponse<T> {

    int code;

    T data;

    String msg;

    @Override
    public String getCode() {
        return String.valueOf(code);
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public Boolean isSuccess() {
        return code == 200;
    }
}
